projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbac1eb
)
Fixed indentation inside parens when comments are around
author
Fabián Ezequiel Gallina
<fgallina@cuca>
Thu, 17 May 2012 03:02:54 +0000
(
00:02
-0300)
committer
Fabián Ezequiel Gallina
<fgallina@gnu.org>
Thu, 17 May 2012 03:02:54 +0000
(
00:02
-0300)
lisp/progmodes/python.el
patch
|
blob
|
history
diff --git
a/lisp/progmodes/python.el
b/lisp/progmodes/python.el
index e4019373362fdb2a902fa3003a817511d622f197..3cdfb43e35fa95e1b162a59af69302281cb638f9 100644
(file)
--- a/
lisp/progmodes/python.el
+++ b/
lisp/progmodes/python.el
@@
-568,7
+568,12
@@
START is the buffer position where the sexp starts."
(save-excursion
(goto-char context-start)
(forward-char)
- (if (looking-at "[[:space:]]*$")
+ (save-restriction
+ (narrow-to-region
+ (line-beginning-position)
+ (line-end-position))
+ (forward-comment 1))
+ (if (looking-at "$")
(+ (current-indentation) python-indent-offset)
(forward-comment 1)
(current-column)))